﻿@page "/barcodereaders"
@inject IStringLocalizer<BarcodeReaders> Localizer

<h3>@Localizer["Title"]</h3>

<h4>@Localizer["SubTitle"]</h4>

<Tips class="mt-3">
    @((MarkupString)Localizer["Tips"].Value)
</Tips>

<div><b>@Localizer["Nuget"]</b></div>

<div class="mt-2">@((MarkupString)Localizer["NugetIntro"].Value)</div>

<div class="code-label mt-3">.NET CLI</div>
<Pre class="no-highlight">dotnet add package BootstrapBlazor.BarCode --version @Version</Pre>

<div class="code-label">PackageReference</div>
<Pre class="no-highlight">&lt;PackageReference Include="BootstrapBlazor.BarCode" Version="@Version" /&gt;</Pre>

<div class="code-label">Package Manager</div>
<Pre class="no-highlight">Install-Package BootstrapBlazor.BarCode -Version @Version</Pre>

<p><b>@Localizer["Attention"]</b></p>
<ul class="ul-demo">
    <li>@((MarkupString)Localizer["Li1"].Value )</li>
    <li>@Localizer["Li4"]</li>
</ul>

<DemoBlock Title="@Localizer["BasicUsageTitle"]" Introduction="@Localizer["BasicUsageIntro"]" Name="Normal">
    <p>@Localizer["Step"]</p>
    <ul class="ul-demo mb-3">
        <li>@Localizer["BasicUsageLi1"]</li>
        <li>@Localizer["BasicUsageLi2"]</li>
        <li>@Localizer["BasicUsageLi3"]</li>
    </ul>
    <BarcodeReader OnInit="@OnInit" OnResult="@OnResult" OnStart="@OnStart" OnClose="@OnClose" OnError="@OnError" />
    <BlockLogger @ref="Trace" class="mt-3" />
</DemoBlock>

<DemoBlock Title="@Localizer["ImageTitle"]" Introduction="@Localizer["ImageIntro"]" Name="Image">
    <p>@Localizer["Step"]</p>
    <ul class="ul-demo mb-3">
        <li>@Localizer["ImageLi1"]</li>
        <li>@Localizer["ImageLi2"]</li>
        <li>@Localizer["ImageLi3"]</li>
    </ul>
    <BarcodeReader ScanType="@ScanType.Image" OnResult="@OnImageResult" OnError="@OnImageError" />
    <BlockLogger @ref="Trace2" class="mt-3" />
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
